<?php

class AnimeController extends Zend_Controller_Action
{
	public function init()
    {
        /* Initialize action controller here */
    }
    
    public function indexAction(){
    	$animeID = $this->_getParam('id', 0);
    	$anime = new Application_Model_DbTable_Anime();
    	$this->view->anime = $anime->getAnime($animeID);
    	$this->view->genres = $anime->getGenres($animeID);
    	$this->view->producers = $anime->getProducers($animeID);
    }

    public function listAction()
    {
    	Zend_View_Helper_PaginationControl::setDefaultViewPartial('controls.phtml');      
    	$animeList = new Application_Model_DbTable_Anime();
        $paginator = Zend_Paginator::factory($animeList->getAnimeList());
        $paginator->setCurrentPageNumber($this->_getParam('page', 1));
        $paginator->setItemCountPerPage(100);
        $this->view->animeList = $paginator;
    } 
}







